<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加商品</title>
    <!-- 引入JQuery -->
    <script src="js/jquery-3.4.1.min.js" th:src="@{/js/jquery-3.4.1.min.js}"></script>
    <!-- 引入BootStrap-->
    <link href="css/bootstrap/css/bootstrap.min.css" th:href="@{/css/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
    <script src="css/bootstrap/js/bootstrap.min.js" th:src="@{/css/bootstrap/js/bootstrap.min.js}"></script>
</head>
<body>
<div class="header-main">
    <div id="head" th:include="head.html :: common_head"></div>
</div>
<br>
<br>
<h1>
    新增商品
</h1>
<div class="container-fluid">
    <div class="row">
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <h2>
                <a class="btn btn-sm btn-success" th:href="@{/selectGoods}">返回商品页面</a>
            </h2>
            <!--新增商品的表单-->
            <form th:action="@{/addGoods}">
                <div class="form-group">
                    <label>商品名</label>
                    <input type="text"  name="goods_name" class="form-control" placeholder="商品名称">
                </div>
                <div class="form-group">
                    <label>商品描述</label>
                    <input type="text" name="goods_description" class="form-control" placeholder="商品描述">
                </div>
                <div class="form-group">
                    <label>商品数量</label>
                    <input type="text" name="goods_count" class="form-control" placeholder="商品数量">
                </div>
                <div class="form-group">
                    <label>商品属于订单</label>
                    <select class="form-control" name="goods_orderid">
                        <option th:each="order:${ordergoods}"
                                th:text="${order.order_name}" th:value="${order.order_id}"></option>
                    </select>
                </div>
                <button type="submit" class="btn btn-primary">添加</button>
            </form>
        </main>
    </div>
</div>
</body>
</html>